<?php
/**
 * Created by PhpStorm.
 * User: lhl
 * Date: 2020/12/10
 * Time: 15:23
 * Features: 每次系统升级时调用,刷新后台列表与实际配置文件同步
 */

namespace app\timeexecution\command;


use app\common\model\depots\DepotsBaseModel;
use think\console\Input;
use think\console\Output;
use think\facade\Cache;

class ClearnDatabaseListCache extends Base
{
    /**
     * 配置命令
     */
    protected function configure()
    {
        $this->setName('ClearnDatabaseListCache')->setDescription('Synchronous admin database list');
    }

    /**
     * 执行程序
     */
    protected function execute(Input $input, Output $output)
    {
        Cache::set(DepotsBaseModel::IS_NEED_ADMIN_REFRESH_DATABASE_LIST_KEY,1);
        $this->writeAndLogs('admin database list cache clear succss',$output);
    }

}